home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / TPWENG / FLDBLANK.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-22  |  834b  |  37 lines

  1. program FldBlank;
  2. uses PXEngine, WinCrt, WinTypes;
  3.  
  4. const TableName = 'Table';
  5.  
  6. var   PxErr: Integer;
  7.       TblHandle: TableHandle;
  8.       RecHandle: RecordHandle;
  9.       FldHandle: FieldHandle;
  10.       Blank: Bool;
  11.  
  12. procedure PX(Code : integer);
  13. begin
  14.   writeln(PXErrMsg(Code));
  15. end;
  16.  
  17. begin
  18.   FldHandle := 1;
  19.  
  20.   PX(PXWinInit('MyApp', pxShared));
  21.   PX(PXTblOpen(TableName, TblHandle, 0, False));
  22.   PX(PXRecBufOpen(TblHandle, RecHandle));
  23.   PX(PXRecGet(TblHandle, RecHandle));
  24.  
  25.   (* See if the field is blank *)
  26.   PxErr := PXFldBlank(RecHandle, FldHandle, Blank);
  27.   if PxErr <> PxSuccess then
  28.     Writeln(PxErrMsg(PxErr))
  29.   else if Blank then
  30.          Writeln('Field is blank')
  31.        else Writeln('Field is not blank');
  32.  
  33.   PX(PXRecBufClose(RecHandle));
  34.   PX(PXTblClose(TblHandle));
  35.   PX(PXExit);
  36. end.
  37.